Optimal. Leaf size=115 \[ -\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {7 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 115, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {1823, 847, 794,
223, 209} \begin {gather*} \frac {7 d^4 \text {ArcTan}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3}-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 223
Rule 794
Rule 847
Rule 1823
Rubi steps
\begin {align*} \int \frac {x^2 (d+e x)^2}{\sqrt {d^2-e^2 x^2}} \, dx &=-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {\int \frac {x^2 \left (-7 d^2 e^2-8 d e^3 x\right )}{\sqrt {d^2-e^2 x^2}} \, dx}{4 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}+\frac {\int \frac {x \left (16 d^3 e^3+21 d^2 e^4 x\right )}{\sqrt {d^2-e^2 x^2}} \, dx}{12 e^4}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {\left (7 d^4\right ) \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx}{8 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {\left (7 d^4\right ) \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^2}\\ &=-\frac {2 d x^2 \sqrt {d^2-e^2 x^2}}{3 e}-\frac {1}{4} x^3 \sqrt {d^2-e^2 x^2}-\frac {d^2 (32 d+21 e x) \sqrt {d^2-e^2 x^2}}{24 e^3}+\frac {7 d^4 \tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )}{8 e^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.21, size = 103, normalized size = 0.90 \begin {gather*} \frac {\sqrt {d^2-e^2 x^2} \left (-32 d^3-21 d^2 e x-16 d e^2 x^2-6 e^3 x^3\right )}{24 e^3}+\frac {7 d^4 \sqrt {-e^2} \log \left (-\sqrt {-e^2} x+\sqrt {d^2-e^2 x^2}\right )}{8 e^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(201\) vs.
\(2(99)=198\).
time = 0.06, size = 202, normalized size = 1.76
method | result | size |
risch | \(-\frac {\left (6 e^{3} x^{3}+16 d \,e^{2} x^{2}+21 d^{2} e x +32 d^{3}\right ) \sqrt {-e^{2} x^{2}+d^{2}}}{24 e^{3}}+\frac {7 d^{4} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{8 e^{2} \sqrt {e^{2}}}\) | \(86\) |
default | \(e^{2} \left (-\frac {x^{3} \sqrt {-e^{2} x^{2}+d^{2}}}{4 e^{2}}+\frac {3 d^{2} \left (-\frac {x \sqrt {-e^{2} x^{2}+d^{2}}}{2 e^{2}}+\frac {d^{2} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{2 e^{2} \sqrt {e^{2}}}\right )}{4 e^{2}}\right )+2 d e \left (-\frac {x^{2} \sqrt {-e^{2} x^{2}+d^{2}}}{3 e^{2}}-\frac {2 d^{2} \sqrt {-e^{2} x^{2}+d^{2}}}{3 e^{4}}\right )+d^{2} \left (-\frac {x \sqrt {-e^{2} x^{2}+d^{2}}}{2 e^{2}}+\frac {d^{2} \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-e^{2} x^{2}+d^{2}}}\right )}{2 e^{2} \sqrt {e^{2}}}\right )\) | \(202\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 96, normalized size = 0.83 \begin {gather*} \frac {7}{8} \, d^{4} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} - \frac {2}{3} \, \sqrt {-x^{2} e^{2} + d^{2}} d x^{2} e^{\left (-1\right )} - \frac {7}{8} \, \sqrt {-x^{2} e^{2} + d^{2}} d^{2} x e^{\left (-2\right )} - \frac {4}{3} \, \sqrt {-x^{2} e^{2} + d^{2}} d^{3} e^{\left (-3\right )} - \frac {1}{4} \, \sqrt {-x^{2} e^{2} + d^{2}} x^{3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.11, size = 78, normalized size = 0.68 \begin {gather*} -\frac {1}{24} \, {\left (42 \, d^{4} \arctan \left (-\frac {{\left (d - \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-1\right )}}{x}\right ) + {\left (6 \, x^{3} e^{3} + 16 \, d x^{2} e^{2} + 21 \, d^{2} x e + 32 \, d^{3}\right )} \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [C] Result contains complex when optimal does not.
time = 4.59, size = 386, normalized size = 3.36 \begin {gather*} d^{2} \left (\begin {cases} - \frac {i d^{2} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{2 e^{3}} + \frac {i d x}{2 e^{2} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i x^{3}}{2 d \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {d^{2} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{2 e^{3}} - \frac {d x \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}}{2 e^{2}} & \text {otherwise} \end {cases}\right ) + 2 d e \left (\begin {cases} - \frac {2 d^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{4}} - \frac {x^{2} \sqrt {d^{2} - e^{2} x^{2}}}{3 e^{2}} & \text {for}\: e \neq 0 \\\frac {x^{4}}{4 \sqrt {d^{2}}} & \text {otherwise} \end {cases}\right ) + e^{2} \left (\begin {cases} - \frac {3 i d^{4} \operatorname {acosh}{\left (\frac {e x}{d} \right )}}{8 e^{5}} + \frac {3 i d^{3} x}{8 e^{4} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i d x^{3}}{8 e^{2} \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} - \frac {i x^{5}}{4 d \sqrt {-1 + \frac {e^{2} x^{2}}{d^{2}}}} & \text {for}\: \left |{\frac {e^{2} x^{2}}{d^{2}}}\right | > 1 \\\frac {3 d^{4} \operatorname {asin}{\left (\frac {e x}{d} \right )}}{8 e^{5}} - \frac {3 d^{3} x}{8 e^{4} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {d x^{3}}{8 e^{2} \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} + \frac {x^{5}}{4 d \sqrt {1 - \frac {e^{2} x^{2}}{d^{2}}}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.94, size = 63, normalized size = 0.55 \begin {gather*} \frac {7}{8} \, d^{4} \arcsin \left (\frac {x e}{d}\right ) e^{\left (-3\right )} \mathrm {sgn}\left (d\right ) - \frac {1}{24} \, {\left (32 \, d^{3} e^{\left (-3\right )} + {\left (21 \, d^{2} e^{\left (-2\right )} + 2 \, {\left (8 \, d e^{\left (-1\right )} + 3 \, x\right )} x\right )} x\right )} \sqrt {-x^{2} e^{2} + d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2\,{\left (d+e\,x\right )}^2}{\sqrt {d^2-e^2\,x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________